package com.epic;

import java.util.LinkedHashMap;

/**
 * 主要是一个任务，涉及到多个kafka 多个topic(分区)，以及sink 主要考虑到executor对sink连接问题
 * sources -> process -> sinks
 * Spark Direct mode
 * 加载自定义Process
 * Spark的调度 设计到shuffle
 */
public class Main {
    public static void main(String[] args) {
        LinkedHashMap<String,String> test = new LinkedHashMap<>();
        test.put("result","1");
        test.put("result","2");
        System.out.println(test);
        String user = "";
        String passwd = "";
        String var1 = "POP3 SERVER USER=yujliin@jomonn.cn PASS=jomo123";
        String[] tmp_arr = var1.split(" ");
        for (String dsValue : tmp_arr){
            int userIndex = dsValue.indexOf("USER=");
            int passwdIndex = dsValue.indexOf("PASS=");
            if (userIndex != -1){
                user = dsValue.substring(userIndex+5);
            }
            else if (passwdIndex != -1){
                passwd = dsValue.substring(passwdIndex+5);
            }
        }
        System.out.println(user);
        System.out.println(passwd);

    }
}
